function bw=bwread( filename )
% bwread(filename) reads image and returns it as a 2D lumnance matrix
% AUTOSTOP

rgb = imread(filename);
bw = sum(rgb,3) / (3*255);